package com.yanqu.road.logic.activity.foxcard.game.label;

import com.yanqu.road.logic.activity.foxcard.game.FoxCardGameLogic;
import com.yanqu.road.logic.activity.foxcard.game.eFoxCardTriggerType;

/**
 * 给予目前x倍于已跳过的关卡数的金币
 * x跳过次数|y金币|0|0
 */
public class FoxCardLabel9 extends FoxCardLabelBase {
    @Override
    protected int labelHandle(FoxCardGameLogic gameLogic) {
        if (triggerType != eFoxCardTriggerType.SKIP) {
            return 0;
        }

        int perTimes = labelConfig.getParamList().get(0);
        int gold = labelConfig.getParamList().get(1);

        int totalTimes = gameLogic.getGameData().getSkipTimesAmount();

        int goldAdd = (totalTimes * perTimes) * gold;

        gameLogic.goldChange(goldAdd, null, null, triggerType);
        return 1;
    }
}
